<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:fragment xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	<h:form id="formLogin">
		<p:dialog id="modalLogin" header="#{str.modal_login_titulo_modal}" widgetVar="loginVar" modal="false" resizable="false" draggable="false" closable="false" visible="#{!login.loginEfetuado()}">
    		<p:messages id="messagesLogin" showDetail="true" autoUpdate="false" closable="true"/>
    		<p:panel id="panelLogin">
	    		<h:panelGrid columns="2" cellpadding="5">
		        	<p:column>
		        		<h:graphicImage url="/resources/images/logo.png"/>
		        	</p:column>
		        	<p:column>
		        		<h:outputText value="#{str.descricao_aux_sistema}"/>
		        	</p:column>
		        </h:panelGrid>
				<h:panelGrid columns="2" cellpadding="5">
		    		<p:column>
		    			<p:outputLabel value="#{str.modal_login_login}:" for="inputLogin" />
		    		</p:column>
		    		<p:column>
		    			<p:inputText id="inputLogin" tabindex="1" maxlength="#{propriedades.getTamanhoMaxLoginUsuarioDoSistema()}" size="45" autocomplete="false" placeholder="#{str.modal_login_login_email}" value="#{login.login}" />
		    		</p:column>
					<p:column>
						<p:outputLabel value="#{str.modal_login_senha}:" for="inputSenha" />
					</p:column>
					<p:column>
						<p:password id="inputSenha" tabindex="2" maxlength="#{propriedades.getTamanhoMinSenhaUsuarioDoSistema()}" size="45" autocomplete="false" placeholder="#{str.modal_login_senha}" value="#{login.senha}" />
					</p:column>
	    		</h:panelGrid>
	    		<f:facet name="footer">
	    			<p:commandButton value="#{str.modal_login_botao_logar}" tabindex="3" update=":#{p:component('messagesLogin')}" action="#{login.efetuarLogin()}"/>
	    			<p:commandLink value="#{str.modal_login_esqueceu_senha}" tabindex="4" styleClass="link-esqueci-senha"/>
	    		</f:facet>
			</p:panel>	
		</p:dialog>   
	</h:form>
</ui:fragment>